@extends('plugin.hostserver.front.layout.user')
@section('content')
    <div class="container mt-5">
        <div class="row tm-content-row">
            <div class="col-12 tm-block-col">
                <div class="tm-bg-primary-dark tm-block tm-block-h-auto">
                    <h2 class="tm-block-title">个人信息</h2>
                    <table class="table table-bordered">
                        <tr>
                            <td>昵称</td>
                            <td>{{ user('name','host_server') }}</td>
                        </tr>
                        <tr>
                            <td>余额</td>
                            <td>
                                <b class="text-success">{{ user('money','host_server') }}</b>
                            </td>
                        </tr>
                        <tr>
                            <td>充值</td>
                            <td>
                                <a href="{{ plugin_route('hostserver.user.recharge',['type'=>'card']) }}"
                                   class="btn btn-info btn-sm " style="margin-top: 20px;">卡密充值</a>
                            </td>
                        </tr>
                        <tr>
                            <td>邮箱</td>
                            <td>{{ user('email','host_server') }} <a href="{{ plugin_route('hostserver.user.seting',['type'=>'email']) }}">修改</a></td>
                        </tr>
                        <tr>
                            <td>服务器数量</td>
                            <td>总共: <b class="text-success">{{ user('server_numbers','host_server') }}</b></td>
                        </tr>
                        <tr>
                            <td>过期服务器</td>
                            <td>总共: <b class="text-danger">{{ user('server_end_numbers','host_server') }}</b></td>
                        </tr>
                        <tr>
                            <td>注册时间</td>
                            <td>{{ user('created_at','host_server') }}</td>
                        </tr>
                    </table>

                </div>
            </div>
        </div>


        <div class="row tm-content-row">
            <div class="col-12 tm-block-col">
                <div class="tm-bg-primary-dark tm-block tm-block-h-auto">
                    <h2 class="tm-block-title">登录记录</h2>
                    <table class="table table-bordered">
                        <tr>
                            <td>
                                最近登录IP
                            </td>
                            <td>登录时间</td>
                        </tr>
                        @if(!empty($log))
                            @foreach($log as $k=>$v)
                                <tr>

                                    <td>{{ $v->ip }}</td>

                                    <td>{{ $v->created_at }}</td>
                                </tr>
                            @endforeach
                        @endif



                    </table>

                </div>
            </div>
        </div>
    </div>
@endsection